Gerhard gets QtCreator going for Windows, updates doc.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jul 2013 01:05:08 +0000 (01:05 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jul 2013 01:05:08 +0000 (01:05 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4467 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/GPSBabel.pro
gpsbabel/jeeps/main.cc
gpsbabel/msvc/README.msvc
gpsbabel/msvc/config.h

index 6fd025ac18e937ff2e915794d43a415ed5fb02a0..dc3f5abdbe93c6fe4f8b6b467a68e465c911240f 100644 (file)
@@ -34,7 +34,7 @@ ALL_FMTS=$$MINIMAL_FMTS gtm.cc gpsutil.cc pcx.cc cetus.cc copilot.cc \
 # ALL_FMTS=$$MINIMAL_FMTS
 FILTERS=position.cc radius.cc duplicate.cc arcdist.cc polygon.cc smplrout.cc \
         reverse_route.cc sort.cc stackfilter.cc trackfilter.cc discard.cc \
-        nukedata.cc interpolate.cc transform.cc height.cc swapdata.cc
+        nukedata.cc interpolate.cc transform.cc height.cc swapdata.cc bend.cc
 
 SHAPE=shapelib/shpopen.c shapelib/dbfopen.c pdbfile.cc
 
@@ -62,13 +62,29 @@ SUBDIRS += jeeps
 macx|linux {
   DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_LIBEXPAT HAVE_GLOB
   DEFINES += HAVE_VA_COPY HAVE_VA_LIST_AS_ARRAY
-  SOURCES += gbser_posix.cc jeeps/gpslibusb.cc
+  SOURCES += gbser_posix.cc
+  JEEPS += jeeps/gpslibusb.cc
   INCLUDEPATH += jeeps
   LIBS += -lexpat
 }
 
 win32 {
-  SOURCES += gbser_win32.cc jeeps/gpsusbwin.c
+  DEFINES += __WIN32__ _CONSOLE
+  DEFINES -= -UNICODE -ZLIB_INHIBITED
+  DEFINES += HAVE_LIBEXPAT
+  CONFIG(debug, debug|release) {
+    DEFINES += _DEBUG
+  }
+  SOURCES += gbser_win.cc
+  JEEPS += jeeps/gpsusbwin.cc
+  INCLUDEPATH += msvc/expat
+  LIBS += ../gpsbabel/msvc/Expat/libexpat.lib setupapi.lib hid.lib
+  TEMPLATE=vcapp
+}
+
+win32-msvc*{
+  DEFINES += _CRT_SECURE_NO_DEPRECATE
+  QMAKE_CXXFLAGS += /MP
 }
 
 linux {
index 128cbd2b713d32efddf83ce0aae65edf6f874078..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,31 +0,0 @@
-#include "gps.h"
-// #include "jeeps.h"
-
-main()
-{
-  int n;
-  GPS_PWay* way;
-  GPS_PWay* array;
-
-  if (GPS_Init("/dev/ttyS0") < 0) {
-    fprintf(stderr, "Can't init\n");
-  }
-
-  if ((n=GPS_Command_Get_Waypoint("/dev/ttyS0", &way))<0) {
-    fprintf(stderr, "can't get\n");
-    return;
-  }
-//     fprintf(stdout," Done\n");
-
-  GPS_Fmt_Print_Waypoint(way, n, stdout);
-
-  array = (GPS_PWay*) calloc(1, sizeof(GPS_PWay));
-  array[0] = GPS_Way_New();
-  strcpy(array[0]->ident,"lower @#$%^&* rocks");
-  strcpy(array[0]->cmnt,"COMMENTCOMMENTCOMMENTCOMMENTCOMMENT");
-  array[0]->wpt_class = 0;
-  array[0]->lat = 1.234;
-  array[0]->lon = 1.234;
-  GPS_Command_Send_Waypoint("/dev/ttyS0", array, 1);
-
-}
index d60611241650b23242725b70b28ff741a206f2a4..8f0acf4315c706dbc1532c9598c3fb571df3f016 100644 (file)
@@ -1,27 +1,38 @@
 
-BUILDING GPSBABEL WITH Microsoft Visual Studio:
+Building GPSBabel on Windows with QtCreator or Microsoft Visual Studio:
 
-Microsoft Visual Studio (MSVS) support is provided for developers, not 
-intended for release builds or testing. Also, the MSVS project is enabled for
+Windows build support is provided for developers, not currently intended 
+for release builds or testing. Also, the Windows native projects are normally enabled for
 the command line application only, not the GUI.
-Note that the project is maintained separately from the regular build and is
-not used by most regular GPSBabel developers. The project may not be updated 
-with for instance new formats. 
+These project files may not be actively maintained. Releases are built with mingw.
+
 Note also that the Microsoft Visual C++ compiler (MSVC) is less standard 
 compliant than other compilers and may require code modifications to compile.
-Please share modifications and patches with the project.
+
+Qt:
+To build you need Qt http://qt-project.com. While the regular GPSBabel build 
+uses Qt 4.6, it is possible to use the console application with Qt 5.1. 
+
+QtCreator:
+The GPSBabel.pro file is enabled also for Windows build in QtCreator.
+To build you need to install a compiler (MS Visual Studio C++ or MinGW c/c++).
+Just open the GPSBabel.pro file in QtCreator.
+
+If you prefer to use the MS Visual editor, you can generate a GPSBabel.vcxproj file.
+To create the project, you can just open a command window, change directory to where you want to create the project file and type: <path-to-qmake> <path-to-GPSBabel.pro>
+For example: ../../Qt/5.1.0/msvc2012/bin/qmake.exe gpsbabel/GPSBabel.pro
+
+Microsoft Visual Studio:
+Note that the default project is maintained separately from the regular build and is
+not used by most regular GPSBabel developers. The project may not be updated 
+with for instance new formats. 
 
 The MSVS project is setup for MSVS2012. "Visual Studio Express 2012 for 
 Windows Desktop" is available for free for non-commercial projects from 
 Microsoft.
 The project file may be usable for MSVC2010 too (untested). Older versions 
 may work with a modified project file.
-The solution has three configurations: Debug, Release and Unicode. (Unicode 
-is similar to Release but sets XML_UNICODE=1, used by Google Earth.)
 
-To build you need Qt http://qt-project.com. While the regular GPSBabel build 
-uses Qt 4.6, it is possible to use Qt5.1 with the MSVS. 
-You may use QtCreator to modify the project, or modify the project manually.
 You need to modify MSVS default or the GPSBabel project for Qt. The following 
 are the default settings:
  * IncludePath (C:\Qt\5.1.0\msvc2012\include)
@@ -29,6 +40,7 @@ are the default settings:
 In addition, if you are using Qt 4, change project properties:
  * Linker->Input->AdditionalIncludeDirectories from qt5core.lib to qtcore.lib.
 
+Other libraries:
 Note that the "Microsoft Windows SDK" (previously "Microsoft Platform SDK")
 is required in addition to the actual compiler package for DeLorme (delbin).
 (Unless you have a special need for this format, it is simpler to patch the
@@ -37,14 +49,12 @@ is required in addition to the actual compiler package for DeLorme (delbin).
 The "Expat" directory contains the import library and header file for the
 Expat DLL.
 
+Running:
 To run GPSBabel, you must make sure that the dlls (Qt and libexpat.dll from
 the Expat directory) is in the DLL search path.  The easiest way to do this,
 and to avoid version conflicts with other programs that use expat, is to put 
 the dlls in the same directory as gpsbabel.exe.
 
-Note that if you build with "normal" GPSBabel build method, you may get
-compile errors as MSVS picks up incorrect config.h file.
 If you experience any problems with this project file or with the build 
 process, please ask for assistance on the gpsbabel-code mailing list at
 http://lists.sourceforge.net/lists/listinfo/gpsbabel-code
index 9890bedb1712a6053a5ac4234c7c283f6118bc57..80d4a598eefec4f90647d482601d91e6595426ba 100644 (file)
@@ -1,3 +1,6 @@
+#if 0
+//This file is no longer used, the defines are set in the project files
+
 #define HAVE_LIBEXPAT 1
 #define __va_copy(ap1, ap2) ((ap1) = (ap2))
 
 #define FILTERS_ENABLED 1
 
 /* 1 to enable Palm PDB support */
-#define  PDBFMTS_ENABLED 1
+#define PDBFMTS_ENABLED 1
 
 /* 1 to enable shapefile support */
 #define SHAPELIB_ENABLED 1
 
 /* 1 to inhibit our use of zlib. */
 #undef ZLIB_INHIBITED
+#endif
\ No newline at end of file